import request from "../utils/request";




let getSupplierList = (page=1, size=5, data) => {
    return request({
        url: `/supplier/list/${page}/${size}`,
        method: 'GET',
        params: data
    })
}




let delSupplier = (id) => {
    return request({
        url: `/supplier/${id}`,
        method: 'DELETE',
    })
}




let addSupplier = (data) => {
    return request({
        url: '/supplier',
        method: 'POST',
        data
    })
}




let getSupplier = (id) => {
    return request({
        url: `/supplier/${id}`,
        method: 'GET',
    })
}



let editSupplier = (id, data) => {
    return request({
        url: `/supplier/${id}`,
        method: 'PUT',
        data
    })
}


export default {
    getSupplierList,
    delSupplier,
    addSupplier,
    getSupplier,
    editSupplier
}